<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>CL-CBS: libMultiRobotPlanning::HybridAStar&lt; State, Action, Cost, Environment, StateHasher &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CL-CBS
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacelibMultiRobotPlanning.html">libMultiRobotPlanning</a></li><li class="navelem"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">HybridAStar</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlibMultiRobotPlanning_1_1HybridAStar-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libMultiRobotPlanning::HybridAStar&lt; State, Action, Cost, Environment, StateHasher &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Spatiotemporal Hybrid A* Algorithm.  
 <a href="classlibMultiRobotPlanning_1_1HybridAStar.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="hybrid__astar_8hpp_source.html">hybrid_astar.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a17185062d98febd93ed33496fa68a6da"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html#a17185062d98febd93ed33496fa68a6da">HybridAStar</a> (<a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &amp;environment)</td></tr>
<tr class="separator:a17185062d98febd93ed33496fa68a6da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ce07189e4d87401cd3e36caf3d70c2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html#a85ce07189e4d87401cd3e36caf3d70c2">~HybridAStar</a> ()</td></tr>
<tr class="separator:a85ce07189e4d87401cd3e36caf3d70c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa25fddfe1d2772051e4d596b728450ec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html#aa25fddfe1d2772051e4d596b728450ec">search</a> (const State &amp;startState, <a class="el" href="structlibMultiRobotPlanning_1_1PlanResult.html">PlanResult</a>&lt; State, Action, Cost &gt; &amp;solution, Cost initialCost=0)</td></tr>
<tr class="separator:aa25fddfe1d2772051e4d596b728450ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename State, typename Action, typename Cost, typename Environment, typename StateHasher = std::hash&lt;State&gt;&gt;<br />
class libMultiRobotPlanning::HybridAStar&lt; State, Action, Cost, Environment, StateHasher &gt;</h3>

<p>Spatiotemporal Hybrid A* Algorithm. </p>
<p>This class implements the Spatiotemporal Hybrid-State A* algorithm. <b>Noted that it could also used as traditional Hybrid-State Astar using correct implementation</b></p>
<p>This class can either use a fibonacci heap, or a d-ary heap. The former is the default. Comment "USE_FIBONACCI_HEAP" to use the d-ary heap instead.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">State</td><td>Custom state for the search. Needs to be copy'able </td></tr>
    <tr><td class="paramname">Action</td><td>Custom action for the search. Needs to be copy'able </td></tr>
    <tr><td class="paramname">Cost</td><td>Custom Cost type (integer or floating point types) </td></tr>
    <tr><td class="paramname"><a class="el" href="classlibMultiRobotPlanning_1_1Environment.html" title="Environment class. ">Environment</a></td><td>This class needs to provide the custom hybrid A* logic. In particular, it needs to support the following functions:<ul>
<li><code>Cost admissibleHeuristic(const State&amp; s)</code><br />
 This function can return 0 if no suitable heuristic is available.</li>
<li><code>bool isSolution(const State&amp; s, Cost gscore, std::unordered_map&lt;State, std::tuple&lt;State, Action, Cost, Cost&gt;</code>, StateHasher&gt;&amp; cameFrom)<br />
 Return true if the given state is close to goal state and it has a collision-free path to goal. It is also needed to insert the generate path-to-goal into the current cameFrom map.</li>
<li><code>State getGoal()</code><br />
 Return goal state of current agent.</li>
<li><code>void getNeighbors(const State&amp; s, std::vector&lt;<a class="el" href="structlibMultiRobotPlanning_1_1Neighbor.html" title="Represents state transations. ">Neighbor</a>&lt;State, Action, Cost&gt; &gt;&amp; neighbors)</code><br />
 Fill the list of neighboring state for the given state s.</li>
<li><code>int calcIndex(const State&amp; s)</code><br />
 This function calculate a index(int) for a given state s, the index uses as a key in closed list.</li>
<li><code>void onExpandNode(const State&amp; s, Cost fScore, Cost gScore)</code><br />
 This function is called on every expansion and can be used for statistical purposes.</li>
<li><code>void onDiscover(const State&amp; s, Cost fScore, Cost gScore)</code><br />
 This function is called on every node discovery and can be used for statistical purposes.</li>
</ul>
</td></tr>
    <tr><td class="paramname">StateHasher</td><td>A class to convert a state to a hash value. Default: std::hash&lt;State&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sh_astar_8cpp-example.html#_a1">sh_astar.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a17185062d98febd93ed33496fa68a6da"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State, typename Action, typename Cost, typename Environment, typename StateHasher = std::hash&lt;State&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">libMultiRobotPlanning::HybridAStar</a>&lt; State, Action, Cost, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a>, StateHasher &gt;::<a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">HybridAStar</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a> &amp;&#160;</td>
          <td class="paramname"><em>environment</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a85ce07189e4d87401cd3e36caf3d70c2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State, typename Action, typename Cost, typename Environment, typename StateHasher = std::hash&lt;State&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">libMultiRobotPlanning::HybridAStar</a>&lt; State, Action, Cost, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a>, StateHasher &gt;::~<a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">HybridAStar</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa25fddfe1d2772051e4d596b728450ec"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename State, typename Action, typename Cost, typename Environment, typename StateHasher = std::hash&lt;State&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classlibMultiRobotPlanning_1_1HybridAStar.html">libMultiRobotPlanning::HybridAStar</a>&lt; State, Action, Cost, <a class="el" href="classlibMultiRobotPlanning_1_1Environment.html">Environment</a>, StateHasher &gt;::search </td>
          <td>(</td>
          <td class="paramtype">const State &amp;&#160;</td>
          <td class="paramname"><em>startState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structlibMultiRobotPlanning_1_1PlanResult.html">PlanResult</a>&lt; State, Action, Cost &gt; &amp;&#160;</td>
          <td class="paramname"><em>solution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Cost&#160;</td>
          <td class="paramname"><em>initialCost</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="hybrid__astar_8hpp_source.html">hybrid_astar.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
